<?php use app\models\Record; ?>
<main class="problem"><article style="width: 100%"><div class="ul list transition"><div class="frame list transition">
<div class="li">
	<div class="container container-header">
		<div class="id info">题号</div>
		<div class="name left">题目名称</div>
		<div class="number-short">通过数</div>
		<div class="number-short">提交数</div>
		<div class="number-short">通过率</div>
	</div>
</div>
<?php foreach ($list as $problem):?>
<div class="li">
	<div class="container">
		<div class="id info"><?php echo $problem['id'] ?></div>
		<div class="name left"><a href="/problem/show/<?php echo $problem['id']?>"><?php echo $problem['name'] ?></a></div>
		<div class="number-short"><?php echo $recordsAC = (int)Record::getRecordsAC($problem['id']);?></div>
		<div class="number-short"><?php echo $records = (int)Record::getRecords($problem['id']); ?></div>
		<div class="number-short"><?php echo ($records?(int)($recordsAC*100/$records):0).'%'; ?></div>
	</div>
</div>
<?php endforeach ?>
</div></div></article></main>